# Created with PyCharm.
# Project_Name SoftwareTesting2022
# PATH Needing
# Files_Name Submit方法提交.py
# Coding UTF-8
# @Version Python 3.8

# @author GeekChunky
# @Email caiyoupeng00@outlook.com

# @Date 2021/11/26
# @CreatTime 11:51


'''
Documentation comments:
    在有表单的的界面上，可以不通过点击按钮进行提交操作，这就需要用到submit()方法
    此源码需要在一个表单（Form）中，并且type需要时submit类型，此时我们的代码可以这样写：
'''

# Now Write Down Your Python Code in Editor...
# Wish You Happy Everyday !

# import webdriver
from selenium import webdriver

# create webdriver object
driver = webdriver.Firefox()

# get geeksforgeeks.org
driver.get("https://www.geeksforgeeks.org/")

# get element
element = driver.find_element_by_id("gsc-i-id2")

# send keys
element.send_keys("Arrays")

# submit contents
element.submit()
